<template>
  <div class="hm-header">
    <div class="left" v-if="showArrow" @click="$emit('clickLeft')">👈</div>
    <div class="center">
      <slot>我是标题</slot>
    </div>
    <div class="right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    showArrow: {
      type: Boolean,
      default: false,
    },
  },
};
</script>

<style lang="less" scoped>
.hm-header {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 10px;
//   background-color: orange;
  border-bottom: 1px solid #ebedf0;
  .center {
    flex: 1;
    text-align: center;
  }
}
</style>
